package com.android.incallui;

import android.view.View;

public class WtComPresenter{
	private static WtComPresenter mWtComPresenter;
	private View mEndCallButtonView;
	private View.OnClickListener mEndCallButtonViewListener;
	
	public static WtComPresenter getInstance(){
		if(mWtComPresenter == null){
			mWtComPresenter = new WtComPresenter();
		}
		return mWtComPresenter;
	}

	public void setEndCallButtonView(View view){
		mEndCallButtonView = view;
		if(mEndCallButtonViewListener != null){
			mEndCallButtonView.setOnClickListener(mEndCallButtonViewListener);
		}
	}

	public void setEndCallButtonListener(View.OnClickListener listener){
		mEndCallButtonViewListener = listener;
		if(mEndCallButtonView != null){
			mEndCallButtonView.setOnClickListener(listener);
		}
	}

	public void setEndCallButtonEnabled(boolean enabled){
		if(mEndCallButtonView != null){
			mEndCallButtonView.setEnabled(enabled);
		}
	}
}
